﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuTouTiaoAssist
{
    public partial class FrmInputInterval2<T> : FrmOkCancelBase where T:new ()
    {
        public T Object
        {
            get
            {
                return (T) this.propertyGrid1.SelectedObject;
            }
            set { this.propertyGrid1.SelectedObject = value; }
        }

        public FrmInputInterval2()
        {
            InitializeComponent();
            this.propertyGrid1.SelectedObject = new T();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            this.Object = (T)this.propertyGrid1.SelectedObject;
            
            base.ReturnOk();
        }
    }
}
